function $$$(id){
	return document.getElementById(id);
}

function dosearch(id,url){
	if($$$(id).value !="" && $$$(id).value != "请输入关键字!" ){
		location.href = url+$$$(id).value;
	}else{
		alert('请输入关键字!');
		$$$(id).value = "";
		$$$(id).focus();
	}
}

function dofocus(id){
	if($$$(id).value == "请输入关键字!"){
		$$$(id).value = "";
	}
}

function doblur(id){
	if($$$(id).value == ""){
		$$$(id).value = "请输入关键字!";
	}
}

function AddFavorite(){
	if (document.all){
		window.external.addFavorite(document.location.href,document.title);
	}else if(window.sidebar){
		window.sidebar.addPanel(document.title,document.location.href, "");
	}
}
function SetHome(obj,vrl){
	try{
		obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
	}catch(e){
		if(window.netscape) {
			try{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			}catch (e) {
alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
			}
			var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage',vrl);
		}
	}
}
var curImgObj = null;
function viewImage(obj,id){
	if(curImgObj != null){
		curImgObj.style.border = "3px solid #555";
	}
	var bigImg = obj.src.replace("_thumb","");
	$$$(id).src = bigImg;
	obj.style.border = "3px solid #500";
	curImgObj = obj;
	$("#previewLink").attr('href',bigImg);
}

//this is my add
//Generate transition CSS (transition=0 to 14)
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.2,transition=14) }</STYLE>');

//Uncomment the next line for fading rollovers instead of dissolving:
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.2) }</STYLE>');

var onImages=new Array();
function Rollover(imgName, imgSrc)
{
	onImages[imgName] = new Image();
	onImages[imgName].src = imgSrc;
}

function turnOn(imgName){
var ua=navigator.userAgent;
     var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE")+5,ua.indexOf(";",ua.indexOf("MSIE"))));
if(document.images[imgName].filters != null)
document.images[imgName].filters[0].apply();
document.images[imgName].offSrc = document.images[imgName].src;
document.images[imgName].src    = onImages[imgName].src;
if(document.images[imgName].filters != null){
if(IEversion == 6.0)
document.images[imgName].filters[0].apply();
else
document.images[imgName].filters[0].play();}
}


function turnOff(imgName){ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].stop();
	document.images[imgName].src = document.images[imgName].offSrc;
}




